from typing import *
from leetcode.editor.common.node import *


# leetcode submit region begin(Prohibit modification and deletion)
class Solution:
    def isAnagram(self, s: str, t: str) -> bool:
        # 这道题简单死了  我想到一个 O（n）的算法
        map_s={}
        map_t={}
        for c in s:
            if c not in map_s:
                map_s[c]=0
            map_s[c] +=1
        for c in t:
            if c not in map_t:
                map_t[c]=0
            map_t[c] +=1
        if map_s == map_t: # python 真牛逼  如果是java 我得手动实现
            return True
        return False
        
# leetcode submit region end(Prohibit modification and deletion)


if __name__ == '__main__':
    solution = Solution()
    # your test code here